<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>注册页面</title>
		<link rel="stylesheet" type="text/css" href="register.css">
		<link rel="stylesheet" type="text/css" href="css/loginstyle.css" />
		<script type="text/javascript" src="js/login.js"></script>
	</head>
	<body>
	<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
	<script type="text/javascript">
		$(function(){
			$("#btn_login").click(function(){
				$.ajax({
					url:'register',
					data:{
						"name":$("#username").val(),
						"sex":$("#usersex").val(),
						"pwd":$("#password").val(),
					},
					dataType:"json",
					success:function(resp){
						if(resp==1){
							$.ajax({
								url:"createFolder",
								data:{
									"parentFolder":'',
									"createFolder":$("#username").val()+"/默认文件夹",
								}
							});
							window.location.href="index.html";
							alert("注册成功");
						}else{
							alert("注册失败");
						}
					}
				})
			})
		})
	</script>
		<div id="login_frame">
			<p id="image_logo"><img src="Image/login.jpg"></p>
			<form method="post" action="">
				<p><label class="label_input">用户名</label><input type="text" id="username" class="text_fiexld"/></p>
				<p><label class="label_input">性别</label><input type="text" id="usersex" class="text_fiexld"/></p>
				<p><label class="label_input">密码</label><input type="password" id="password" class="text_fiexld"/></p>
				<div id="login_control">
					<input type="button" id="btn_login" value="注册" onclick="login();"/>
				</div>
			</form>
		</div>
	</body>
</html>
